import frida
import sys

rdev = frida.get_remote_device()
# Application(identifier="today.tophub.app", name="今日热榜", pid=15873, parameters={})
session = rdev.attach("今日热榜")


# today.tophub.app.utils.j
scr = '''
Java.perform(function () {
    var m = Java.use("today.tophub.app.utils.m");
    m.a.implementation = function(i2){
        //console.log("——————————————————————这是返回值",i2);
        var res = this.a(i2)
        console.log("——————————————————————这是返回值",res);
        return res
    };
});
'''

script = session.create_script(scr)


def on_message(message, data):
    print(message, data)


script.on("message", on_message)

script.load()
sys.stdin.read()